package com.example.back.service.impl;

import com.example.back.mapper.RouteMapper;
import com.example.back.model.Accommodation;
import com.example.back.service.AccommodationService;
import com.example.back.mapper.AccommodationMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author jialily
 * @description 针对表【t_accommodation】的数据库操作Service实现
 * @createDate 2022-05-02 14:23:06
 */
@Service("accommodationService")
@Transactional(propagation = Propagation.SUPPORTS,rollbackFor = Exception.class)
public class AccommodationServiceImpl implements AccommodationService {

    @Autowired
    AccommodationMapper accommodationMapper;

    public List<Accommodation> selectAll() {
        return this.accommodationMapper.selectAll();
    }

    @Override
    public Accommodation selectDetail(String itemId) {
        return this.accommodationMapper.selectDetail(itemId);
    }
}
